package com.yunzhou.service.impl;

import com.yunzhou.entity.LikeRecord;
import com.yunzhou.mapper.LikeRecordMapper;
import com.yunzhou.service.LikeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LikeRecordServiceImpl implements LikeRecordService {

    @Autowired
    private LikeRecordMapper likeRecordMapper;

    // 根据用户ID和操作类型获取点赞记录列表
    public List<LikeRecord> getLikeRecordListByUserIdAndOpType(Long userId, Integer opType, Integer pageNum, Integer pageSize){
        return likeRecordMapper.getLikeRecordListByUserIdAndOpType(userId,opType,pageNum,pageSize);
    }

    // 根据用户ID和操作类型获取点赞记录数
    public Integer getLikeRecordListTotalByUserIdAndOpType(Long userId, Integer opType){
        return likeRecordMapper.getLikeRecordListTotalByUserIdAndOpType(userId, opType);
    }
}
